package one.stand.feign;

import one.stand.entity.excel.BusinessExcelEntity;
import one.stand.entity.excel.CompanyExcelEntity;
import one.stand.fallback.AdminFallBack;
import one.stand.model.AdminRecordModel;
import one.stand.model.FinanceModel;
import one.stand.model.MenuModel;
import one.stand.model.ResultModel;
import one.stand.request.*;
import one.stand.request.live.SwitchVideoForm;
import one.stand.response.*;
import one.stand.util.ExportDataDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
@Component
@FeignClient(value = "admin-service", fallback = AdminFallBack.class, decode404 = true)
public interface AdminFegin {

    /**
     * 登录
     *
     * @param request
     * @return
     */
    @PostMapping("index/login")
    ResultModel<AdminResponse> login(@RequestBody AdminRequest request);

    /**
     * 登录
     *
     * @param token
     * @return
     */
    @PostMapping("index/checkingToken")
    ResultModel<Boolean> checkingToken(@RequestParam(value="token") String token);

    /**
     * 企业首页数据统计
     *
     * @param request
     * @return
     */
    @PostMapping("index/indexData")
    ResultModel<FinanceModel> indexData(@RequestBody FinanceRequest request);

    /**
     * 企业首页数据统计
     *
     * @param request
     * @return
     */
    @PostMapping("index/selectAdminRecordList")
    ResultModel<Map<String, Object>> selectAdminRecordList(@RequestBody AdminRecordRequest request);

    /**
     * 企业首页数据统计折线图
     *
     * @param request
     * @return
     */
    @PostMapping("index/newCountList")
    ResultModel<Map<String, List<Map<String, Object>>>> newCountList(@RequestBody FinanceRequest request);

    /**
     * 企业首页数据概况
     *
     * @param request
     * @return
     */
    @PostMapping("index/dataCenter")
    ResultModel<Map<String, Object>> dataCenter(@RequestBody FinanceRequest request);

    /**
     * 数据中心-用户增长情况
     *
     * @param request
     * @return
     */
    @PostMapping("index/newUserCountList")
    ResultModel<List<Map<String, Object>>> newUserCountList(@RequestBody FinanceRequest request);

    /**
     * 数据中心-使用人数增长情况
     *
     * @param request
     * @return
     */
    @PostMapping("index/userUseCountList")
    ResultModel<List<Map<String, Object>>> userUseCountList(@RequestBody FinanceRequest request);

    /**
     * 用户画像-性别分布
     *
     * @param request
     * @return
     */
    @PostMapping("index/userSexCount")
    ResultModel<List<Map<String, Object>>> userSexCount(@RequestBody FinanceRequest request);

    /**
     * 查询企业列表
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectCompanyList")
    ResultModel<Map<String, Object>> selectCompanyList(@RequestBody CompanyRequest request);

    /**
     * 查询企业列表
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectCompanyListExport")
    ResultModel<ExportDataDTO<CompanyExcelEntity>> selectCompanyListExport(@RequestBody CompanyRequest request);

    /**
     * 查询企业信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/getAdminCompanyInfo")
    ResultModel<CompanyResponse> getAdminCompanyInfo(@RequestBody CompanyRequest request);

    /**
     * 查询代理商企业下公司的信息
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectAgentCompanyList")
    ResultModel<Map<String, Object>> selectAgentCompanyList(@RequestBody CompanyRequest request);

    /**
     * 设置企业代理权限和代理价格
     *
     * @param request
     * @return
     */
    @PostMapping("company/configureAgen")
    ResultModel<Boolean> configureAgen(@RequestBody CompanyRequest request);

    /**
     * 查询总后台管理员列表
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectAdminList")
    ResultModel<Map<String, Object>> selectAdminList(@RequestBody AdminRequest request);

    /**
     * 新增总后台管理员
     *
     * @param request
     * @return
     */
    @PostMapping("company/saveAdmin")
    ResultModel<Integer> saveAdmin(@RequestBody AdminRequest request);

    /**
     * 设置总后台管理员权限
     *
     * @param request
     * @return
     */
    @PostMapping("company/inserAdminRole")
    ResultModel<Boolean> inserAdminRole(@RequestBody AdminRequest request);

    /**
     * 设置总后台管理员权限
     *
     * @param request
     * @return
     */
    @PostMapping("company/delAdmin")
    ResultModel<Boolean> delAdmin(@RequestBody AdminRequest request);

    /**
     * 查询管理员权限列表
     *
     * @param request
     * @return
     */
    @PostMapping("company/selectMenuList")
    ResultModel<List<MenuModel>> selectMenuList(@RequestBody AdminRequest request);

    /**
     * 为普通企业设置代理商
     *
     * @param request
     * @return
     */
    @PostMapping("company/updateAgentCompanyId")
    ResultModel<Boolean> updateAgentCompanyId(@RequestBody CompanyRequest request);

    /**
     * 新增总后台管理员
     *
     * @param request
     * @return
     */
    @PostMapping("company/appletCodeManageList")
    ResultModel<Map<String, Object>> appletCodeManageList(@RequestBody VersionRequest request);

    /**
     * 新增总后台管理员
     *
     * @param request
     * @return
     */
    @PostMapping("company/appletCodeManageInfo")
    ResultModel<VersionResponse> appletCodeManageInfo(@RequestBody VersionRequest request);

    /**
     * 添加版本号
     *
     * @param request
     * @return
     */
    @PostMapping("company/addVersionInfo")
    ResultModel<Boolean> addVersionInfo(@RequestBody VersionRequest request);

    /**
     * 审核公司
     *
     * @param request
     * @return
     */
    @PostMapping("company/auditCompany")
    ResultModel auditCompany(@RequestBody CompanyRequest request);

    /**
     * 公司购买名片服务数
     *
     * @param request
     * @return
     */
    @PostMapping("company/addCompanyService")
    ResultModel addCompanyService(@RequestBody CompanyServiceRequest request);

    /**
     * 审核名片
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/auditBusinessCard")
    ResultModel<Boolean> auditBusinessCard(@RequestBody BusinessCardRequest request);

    /**
     * 查询用户列表
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/selectCustomerList")
    ResultModel<Map<String, Object>> selectCustomerList(@RequestBody BusinessCardRequest request);

    /**
     * 导出用户列表
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/selectCustomerListExport")
    ResultModel<ExportDataDTO<BusinessExcelEntity>> selectCustomerListExport(@RequestBody BusinessCardRequest request);

    /**
     * 查询用户信息
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/getCustomerInfo")
    ResultModel<BusinessCardResponse> getCustomerInfo(@RequestBody BusinessCardRequest request);

    /**
     * 禁用用户
     *
     * @param request
     * @return
     */
    @PostMapping("businessCard/stopCustomer")
    ResultModel<Boolean> stopCustomer(@RequestBody BusinessCardRequest request);

    /**
     * 禁用用户
     *
     * @return
     */
    @PostMapping("company/selectAppId")
    ResultModel<List<String>> selectAppId(@RequestParam(value="versionId") Integer versionId);

    /**
     * 获取小程序列表
     *
     * @return
     */
    @PostMapping("company/selectCompanyAccountList")
    ResultModel<Map<String, Object>> selectCompanyAccountList(@RequestBody CompanyAccountRequest request);

    /**
     * 查询企业公告列表
     *
     * @param request
     * @return
     */
    @PostMapping("notice/selectNoticeList")
    ResultModel<Map<String, Object>> selectNoticeList(@RequestBody NoticeRequest request);

    /**
     * 查询企业公告信息
     *
     * @param request
     * @return
     */
    @PostMapping("notice/getNoticeInfo")
    ResultModel<NoticeResponse> getNoticeInfo(@RequestBody NoticeRequest request);

    /**
     * 新增/修改企业公告
     *
     * @param request
     * @return
     */
    @PostMapping("notice/insertNotice")
    ResultModel<Boolean> insertNotice(@RequestBody NoticeRequest request);

    /**
     * 删除企业公告
     *
     * @param request
     * @return
     */
    @PostMapping("notice/delNotice")
    ResultModel<Boolean> delNotice(@RequestBody NoticeRequest request);

    @PostMapping("company/findCompanySwtich")
    ResultModel<Map<String, Object>> findCompanySwtich(CompanyRequest request);

    @PostMapping("company/switchVideo")
    ResultModel<Boolean> switchVideo(SwitchVideoForm request);

    @PostMapping("company/updateVideoSize")
    ResultModel<Boolean> updateVideoSize(SwitchVideoForm request);
}
